var mongoose = require('mongoose');
// 链接mongo
const DB_URL = 'mongodb://127.0.0.1:27017/test';
 mongoose.connect(DB_URL,{useUnifiedTopology:true,useNewUrlParser: true},function (err) {
  if(err){
      console.log("数据库连接失败！",err);
  }else{
      console.log("数据库连接成功！");
    
  }
})
module.exports = mongoose;